<?php

namespace App\Entity;

use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\LogRepository;

/**
 * Log
 *
 * @ORM\Table(name="log", indexes={@ORM\Index(name="idx_uid", columns={"uid"})})
 * @ORM\Entity(repositoryClass=LogRepository::class)
 */
class Log
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer", nullable=false, options={"comment"="自增主键"})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var int
     *
     * @ORM\Column(name="uid", type="integer", nullable=false, options={"comment"="操作人"})
     */
    private $uid = '0';

    /**
     * @var string|null
     *
     * @ORM\Column(name="username", type="string", length=255, nullable=true, options={"comment"="用户名"})
     */
    private $username = '';

    /**
     * @var string|null
     *
     * @ORM\Column(name="content", type="text", length=65535, nullable=true, options={"comment"="行为"})
     */
    private $content;

    /**
     * @var array|null
     *
     * @ORM\Column(name="param", type="json", nullable=true)
     */
    private $param;

    /**
     * @var int|null
     *
     * @ORM\Column(name="create_time", type="integer", nullable=true, options={"comment"="创建时间"})
     */
    private $createTime = '0';

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getUid(): ?int
    {
        return $this->uid;
    }

    public function setUid(int $uid): static
    {
        $this->uid = $uid;

        return $this;
    }

    public function getUsername(): ?string
    {
        return $this->username;
    }

    public function setUsername(?string $username): static
    {
        $this->username = $username;

        return $this;
    }

    public function getContent(): ?string
    {
        return $this->content;
    }

    public function setContent(?string $content): static
    {
        $this->content = $content;

        return $this;
    }

    public function getParam(): ?array
    {
        return $this->param;
    }

    public function setParam(?array $param): static
    {
        $this->param = $param;

        return $this;
    }

    public function getCreateTime(): ?int
    {
        return $this->createTime;
    }

    public function setCreateTime(?int $createTime): static
    {
        $this->createTime = $createTime;

        return $this;
    }


}
